<template>
  <div class="car">
    <navbar>
      <div slot="navbar-center">购物车（{{this.$store.state.car.length}}）</div>
    </navbar>
<!--    <h2>购物车</h2>-->
    <car-item :car-item-list="carItemList"></car-item>
    <car-calculate></car-calculate>
    <tabbar></tabbar>
  </div>
</template>

<script>
import Navbar from "../components/navbar/navbar";
import Tabbar from "../components/tabbar/tabbar";
import CarItem from "./car/carItem";
import CarCalculate from "./car/carCalculate";
export default {
  name: "car",
  components: {CarCalculate, CarItem, Tabbar, Navbar},
  data(){
    return{
      count:1,
      carItemList:this.$store.state.car
    }
  },
  methods:{
  }
}
</script>

<style scoped>
.car{
  margin: 5.5rem 0 7rem 0;
}

</style>